From 04a24b438bb0f57583b9f893b833572e5097f018 Mon Sep 17 00:00:00 2001 From: Tatsuyuki Ishi Date: Sun, 27 Aug 2017 16:14:15 +0900 Subject: [PATCH] tests/cfg: allow unused extern crates --- tests/cfg.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cfg.rs b/tests/cfg.rs index 0e7bbb617..e1af62158 100644 --- a/tests/cfg.rs +++ b/tests/cfg.rs @@ -208,7 +208,7 @@ fn works_through_the_registry() { [dependencies] bar = "0.1.0" "#) - .file("src/lib.rs", "extern crate bar;"); + .file("src/lib.rs", "#[allow(unused_extern_crates)] extern crate bar;"); assert_that(p.cargo_process("build"), execs().with_status(0).with_stderr("\ @@ -242,7 +242,7 @@ fn ignore_version_from_other_platform() { [target.'cfg({})'.dependencies] foo = "0.2.0" "#, this_family, other_family)) - .file("src/lib.rs", "extern crate foo;"); + .file("src/lib.rs", "#[allow(unused_extern_crates)] extern crate foo;"); assert_that(p.cargo_process("build"), execs().with_status(0).with_stderr("\ -- 2.30.2